<%include head.ejs%>
<body>
<div class="wp">
    <header class="t-header">
        <div class="topbar">
            <a href="/usr/index" class="gobakA fl">
                <i class="icon-angle-left"></i>
            </a>
            <span>佣金明细</span>
        </div><!-- topbar end -->
    </header>

    <div class="myYJinfo-tx-top">
        <img src="/images/tx-top.png">
    </div>

    <div class="myYjinfo-TXlist">
        <ul>
            <li>
                <dl class="tit">
                    支付类型
                </dl>
                <dl class="txt">
                    个人微信转账
                </dl>
            </li>
            <li>
                <dl class="tit">
                    可用余额
                </dl>
                <dl class="txt">
                    <%= commValue[0].comm/100%>元
                </dl>
            </li>
            <li>
                <dl class="tit">
                    提现金额
                </dl>
                <dl class="txt">
                    <%= commValue[0].comm/100%>元
                </dl>
            </li>
            <li>
                <dl class="tit">
                    手机号码
                </dl>
                <dl class="txt">
                    <input type="tel" id="phone" name="user_phone" placeholder="请输入您的手机号码" />
                </dl>
            </li>
        </ul>
    </div>

    <div class="myYjinfo-TXbox">
        <div class="tips">
            注：为了提现安全，请认真填写您的手机号码
        </div>
        <div class="ewm">
            <img src="/images/tx-ewm.png">
            <span>长按二维码，添加提现客服</span>
        </div>
        <div class="txBtn">
            <a class="txBtn_A">提现</a>
        </div>
    </div>

    <div class="myYjinfo-wxTips">
        <h1>温馨提示：</h1>
        <p>1、消费当天第七个工作日才能提现；</p>
        <p>2、最低提现金额10元</p>
    </div>

    <div class="myYJlistbox myYjtx">
        <ul>
            <li class="tit clearfix">
                <dl><span>时间</span></dl>
                <dl><span>支付金额（元）</span></dl>
                <dl><span>支付方式</span></dl>
                <dl><span>状态</span></dl>
            </li>
            <% for(var i in deposInfo){%>
            <li class="clearfix">
                <dl>
                        <span>
                            <font class="data"><%= deposInfo[i].ct_time%></font>
                        </span>
                </dl>
                <dl><span><%= deposInfo[i].comm_total/100%></span></dl>
                <dl><span><%= deposInfo[i].pay_method%></span></dl>
                <dl class="txIng"><span><%= deposInfo[i].state%></span></dl>
            </li>
            <%}%>
        </ul>
    </div>
</div>
</body>
<script>
    $(function () {
       $('.txBtn_A').click(function () {
           var commTotal = <%= commValue[0].comm%>;
           var phone = $('#phone').val();
           if(commTotal >= 1000 && phone.length == 11){
               $.get('/depos/getComm',{phone:phone,payMethod:'个人微信转账'},function (data) {
                   iosOverlay({
                       text: "申请成功！ ",
                       duration: 2e3,
                       icon: "/images/tipsokico.png"
                   });

                   setTimeout(function () {
                       location.reload();
                   },2000)
               })
           }else {
               iosOverlay({
                   text: "提现金额不满足或请填写手机号码！",
                   duration: 2e3,
                   icon: "/images/erricon.png"
               });
           }
       })
    });
</script>